/**
 * 
 */
package com.club325.voicemicroblog.persist.test;

import com.club325.voicemicroblog.database.hibernateutil.HibernateUtil;
import com.club325.voicemicroblog.domain.VoiceFile;

/**
 * @author sider
 *
 */
public class VoiceFileEnvironment implements Environment {
	protected static final String newSpeakerID1 = "TestNewSpeaker1";
	protected static final String newLabel1 = "TestNewLabel1";
	protected static final String newVoiceFileID1 = "TestNewVoiceFileID1";
	
	protected static final String SpeakerID1 = UserEnvironment.TestUserID1;
	protected static final String SpeakerID2 = UserEnvironment.TestUserID2;
	protected static final String SpeakerID3 = UserEnvironment.TestUserID3;
	protected static final String Label1 = "TestLabel1";
	protected static final String Label1r = "TestLabel1r";
	protected static final String Label2 = "TestLabel2";
	protected static final String Label3 = "TestLabel3";
	protected static final String VoiceFileID1 = "TestVoiceFileID1";
	protected static final String VoiceFileID1r = "TestVoiceFileID1r";
	protected static final String VoiceFileID2 = "TestVoiceFileID2";
	protected static final String VoiceFileID3 = "TestVoiceFileID3";
	
	protected VoiceFile vf1, vf2, vf3, vf1r;

	/* (non-Javadoc)
	 * @see com.club325.voicemicroblog.Business.test.Environment#setup()
	 */
	public void setup() {
		vf1 = new VoiceFile();
		vf2 = new VoiceFile();
		vf3 = new VoiceFile();
		vf1r = new VoiceFile();
		
		vf1.setSpeaker(SpeakerID1);
		vf2.setSpeaker(SpeakerID2);
		vf3.setSpeaker(SpeakerID3);
		vf1r.setSpeaker(SpeakerID1);
		
		vf1.setLabel(Label1);
		vf2.setLabel(Label2);
		vf3.setLabel(Label3);
		vf1r.setLabel(Label1r);
		
		vf1.setVoiceFileID(VoiceFileID1);
		vf2.setVoiceFileID(VoiceFileID2);
		vf3.setVoiceFileID(VoiceFileID3);
		vf1r.setVoiceFileID(VoiceFileID1r);
		
		HibernateUtil.add(vf1);
		HibernateUtil.add(vf2);
		HibernateUtil.add(vf3);
		HibernateUtil.add(vf1r);
	}

	/* (non-Javadoc)
	 * @see com.club325.voicemicroblog.Business.test.Environment#tearDown()
	 */
	public void tearDown() {
		HibernateUtil.delete(vf1);
		HibernateUtil.delete(vf2);
		HibernateUtil.delete(vf3);
		HibernateUtil.delete(vf1r);
	}

}
